#ifndef _IMAGE_H_LULY_
#define _IMAGE_H_LULY_
#include <string>

#include "Rect.h"

class Image {
 private:
  std::string imageId;

 public:
  //空的Image
  Image() {}
  //创建，加载图片
  Image(std::string fileName, std::string imageId);
  //加载已存在的图片
  Image(std::string imageId);

  std::string getId() { return imageId; }

  int getWidth();
  int getHeight();
  void draw(int x, int y);
  void draw(int x, int y, double scale, double angle);

  //绘制该图像的某部分
  void draw(Rect cut, int x, int y, double destWidth, double destHeight,
            double angle = 0);
  //   void drawArea(Rect area, Rect cut, int x, int y, double destWidth,
  //                 double destHeight, double angle = 0);
  void drawArea(Rect area, Rect cut, Rect dest, double angle = 0);
};

#endif